package com.usian.user.feign;

import com.usian.model.article.ApAuthor;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("leadnews-article")
public interface ArticleFeign {
    @PostMapping("/api/v1/author/save")
    ResponseResult saveAuthor(@RequestBody ApAuthor author);

    @GetMapping("/api/v1/author/getById/{authorId}")
    ApAuthor getById(@PathVariable Integer authorId);
}
